package com.sihan.swvp.service.wg;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import com.sihan.swvp.dao.wg.WgDxwgDao;
import com.sihan.swvp.entity.wg.WgDxwg;
@Service
public class WgDxwgService{

	@Autowired
	private WgDxwgDao wgDxwgDao;
	
	public Page<Map<String, Object>> getWgDxwg(Map<String, Object> params,Integer page,Integer limit) {
		if(page !=null && limit !=null){
			PageHelper.startPage(page, limit);
		}
		return wgDxwgDao.getWgDxwg(params);
	}

	public void addWgDxwg(WgDxwg bean) {
		wgDxwgDao.addWgDxwg(bean);
	}

	public void updateWgDxwg(WgDxwg bean) {
		wgDxwgDao.updateWgDxwg(bean);
	}

	public int deleteWgDxwg(Integer id) {
		return wgDxwgDao.deleteWgDxwg(id);
	}

	public Map<String, Object> getWgDxwgValidate(WgDxwg bean) {
		return wgDxwgDao.getWgDxwgValidate(bean);
	}
}
